package org.goldfish.cookied_chatroom02.model;

import jakarta.servlet.RequestDispatcher;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpSession;
import org.goldfish.cookied_chatroom02.entity.UserBean;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public interface LoginManager extends LoginParams,RegisterManager{

    RequestDispatcher chat(HttpServletRequest request);
    @Nullable
    Boolean userNewToDB(UserBean bean);
    /**
     * {@code GET}
     */
    boolean writeUserBeanToRequestAttr(HttpServletRequest request, UserBean userBean);
    boolean writeUserBeanToSession(@NotNull HttpServletRequest request, @NotNull UserBean userBean);
    boolean isLoggedIn(HttpSession session, HttpServlet servlet);
    boolean addLoggedIn(HttpServlet servlet, HttpServletRequest request);

}
